package com.xiaoxu.spzx.user.controller;

import com.xiaoxu.spzx.model.entity.user.UserAddress;
import com.xiaoxu.spzx.model.vo.common.Result;
import com.xiaoxu.spzx.model.vo.common.ResultCodeEnum;
import com.xiaoxu.spzx.user.service.UserAddressService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "用户地址接口")
@RestController
@RequestMapping(value="/api/user/userAddress")
public class UserAddressController {
    @Autowired
    private UserAddressService userAddressService;
    //查询用户得收货地址
      @GetMapping("/auth/findUserAddressList")
        public Result<List<UserAddress>> findUserAddress(){
            List<UserAddress> list   =  userAddressService.findUserAddress();
            return Result.build(list, ResultCodeEnum.SUCCESS);
        }

}
